package com.hxzy.remote.fallback;

import com.hxzy.remote.OrderServiceOpenFeignApi;
import feign.hystrix.FallbackFactory;
import lombok.extern.log4j.Log4j2;
import org.springframework.stereotype.Component;

/**
 * 订单远程访问的API，熔断处理方法
 *
 * @author tonneyyy
 */
 @Component
 @Log4j2
public class OrderServiceOpenFeignApiFallBackFactory implements FallbackFactory<OrderServiceOpenFeignApi> {
    @Override
    public OrderServiceOpenFeignApi create(Throwable throwable) {
        log.error(throwable);

        return new OrderServiceOpenFeignApi() {

        };
    }
}
